<?php

/**
 * Created by PhpStorm.
 * User: zuoa
 * Date: 2016/12/16 0016
 * Time: 14:08
 */
class Y_Model extends CI_Model
{
    public $userdata = null;

    public function __construct()
    {
        $this->load->database();
    }

    private function is_admin()
    {
        return $this->userdata != null && (((int)$this->userdata["is_admin"]) == 1);
    }
}